package member.model.domain;

public class Member {
	private String memberId; //pk
	private String memberPassword; //nn
	private String email; //nn
	private String memberName;
	private int age;
	private String gender;
	private String address;
	private String dropFlag;
	
	//constructor
	public Member() {}
	//가입 필수 입력 정보
	public Member(String memberId, String memberPassword, String email) {
		this.memberId = memberId;
		this.memberPassword = memberPassword;
		this.email = email;
	}
	public Member(String memberId, String memberPassword, String email,
			String memberName, int age, String gender, String address,
			String dropFlag) {
		this.memberId = memberId;
		this.memberPassword = memberPassword;
		this.email = email;
		this.memberName = memberName;
		this.age = age;
		this.gender = gender;
		this.address = address;
		this.dropFlag = dropFlag;
	}
	
	//getter, setter
	public String getMemberId() {
		return memberId;
	}
	public void setMemberId(String memberId) {
		this.memberId = memberId;
	}
	public String getMemberPassword() {
		return memberPassword;
	}
	public void setMemberPassword(String memberPassword) {
		this.memberPassword = memberPassword;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getMemberName() {
		return memberName;
	}
	public void setMemberName(String memberName) {
		this.memberName = memberName;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	public String getGender() {
		return gender;
	}
	public void setGender(String gender) {
		this.gender = gender;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getDropFlag() {
		return dropFlag;
	}
	public void setDropFlag(String dropFlag) {
		this.dropFlag = dropFlag;
	}
	@Override
	public String toString() {
		return "Member [memberId=" + memberId + ", memberPassword="
				+ memberPassword + ", email=" + email + ", memberName="
				+ memberName + ", age=" + age + ", gender=" + gender
				+ ", address=" + address + ", dropFlag=" + dropFlag + "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((address == null) ? 0 : address.hashCode());
		result = prime * result + age;
		result = prime * result
				+ ((dropFlag == null) ? 0 : dropFlag.hashCode());
		result = prime * result + ((email == null) ? 0 : email.hashCode());
		result = prime * result + ((gender == null) ? 0 : gender.hashCode());
		result = prime * result
				+ ((memberId == null) ? 0 : memberId.hashCode());
		result = prime * result
				+ ((memberName == null) ? 0 : memberName.hashCode());
		result = prime * result
				+ ((memberPassword == null) ? 0 : memberPassword.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Member other = (Member) obj;
		if (address == null) {
			if (other.address != null)
				return false;
		} else if (!address.equals(other.address))
			return false;
		if (age != other.age)
			return false;
		if (dropFlag == null) {
			if (other.dropFlag != null)
				return false;
		} else if (!dropFlag.equals(other.dropFlag))
			return false;
		if (email == null) {
			if (other.email != null)
				return false;
		} else if (!email.equals(other.email))
			return false;
		if (gender == null) {
			if (other.gender != null)
				return false;
		} else if (!gender.equals(other.gender))
			return false;
		if (memberId == null) {
			if (other.memberId != null)
				return false;
		} else if (!memberId.equals(other.memberId))
			return false;
		if (memberName == null) {
			if (other.memberName != null)
				return false;
		} else if (!memberName.equals(other.memberName))
			return false;
		if (memberPassword == null) {
			if (other.memberPassword != null)
				return false;
		} else if (!memberPassword.equals(other.memberPassword))
			return false;
		return true;
	}
	
	
	
	
	
	
	
}
